Crear el reembolso de una transacción bloqueada
POST
/v1/external/blocked-transactions/{id}/refund
Server
Crea el reembolso de una transacción bloqueada de la tienda. El reembolso al remitente del depósito se programa sin código y se envía tras el tiempo de espera (estado scheduled). El reembolso a otra dirección requiere el código enviado al correo de la billetera (send-code) y se envía después de que el propietario de la tienda lo apruebe (estado pending_review)
Authorizations
XApiKey
TypeAPI Key (header: X-Api-Key)
Parameters
Path Parameters
id*
Blocked transaction ID
Typestring
RequiredRequest Body
JSON
{
"code": "string",
"destination_address": "string"
}
Responses
OK
application/json
JSON
{
"code": 0,
"data": {
"amount": 0,
"amount_usd": 0,
"auth_method": "string",
"block_reasons": [
{
"risk_type": "string",
"threshold": 0,
"value": 0
}
],
"blockchain": "string",
"blocked_transaction_id": "string",
"created_at": "string",
"currency_code": "string",
"currency_id": "string",
"destination_address": "string",
"email": "string",
"execute_after": "string",
"from_address": "string",
"id": "string",
"last_error": "string",
"reviewed_at": "string",
"risk_level": "string",
"score": 0,
"status": "string",
"store_id": "string",
"to_address": "string",
"transaction_id": "string",
"transfer_id": "string",
"tx_hash": "string",
"updated_at": "string",
"wallet_id": "string"
},
"message": "string"
}
POST
/v1/external/blocked-transactions/{id}/refund
Server
Server
Samples
cURL
curl -X POST \
'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund' \
-H "Content-Type: application/json"JavaScript
fetch('https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund', {method:'POST',headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));PHP
<?php
$url = 'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund';
$method = 'POST';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>Python
import requests
url = 'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund'
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
print(response.json())